package org.knot.autojmx;

import javax.management.ObjectInstance;
/**
 * 
 * AutoJMX 处理类
 * 
 * @author <a href="mailto:yuxiaoweimail@gmail.com">yuxiaowei</a>
 *
 */
public interface AutoJMXHandler {
	
	/**
	 * initial method 
	 */
	public void init();
	
	/**
	 * Registers the Dynamic Mbean.
	 */
	public void start();

	/**
	 * Unregisters the Dynamic Mbean.
	 */
	public void stop();
	
	
	/**
	 * Returns true if the MBean is registered.
	 * 
	 * @return true if the MBean is registered.
	 */
	public boolean isRegistered();
	
	/**
	 * Returns the objectName used to register the MBean. If the MBean is not
	 * registered, return an empty string.
	 */
	public String getUsedObjectName();
	
	/**
	 * Returns ObjectInstance used to register the MBean. If the MBean is not registered , return null
	 * @return instance
	 */
	public ObjectInstance getInstance();
}
